import service from "../utils/useRequest";

export const getNoticeList = () => {
    return service.request({
        url: '/noticeList',
        method: "GET"
    })
}

export const createNoticeApi = (data) => {
    return service.request({
        url: '/addNotice',
        method: "POST",
        data
    })
}

export const updateNoticeApi = (id: number, data: any) => {
    return service.request({
        url: `/updateNotice/${id}`,
        method: "PUT",
        data
    })
}

export const deleteNoticeApi = (id: number) => {
    return service.request({
        url: `/deleteNotice/${id}`,
        method: 'DELETE',
    })
}
